#ifndef KRAWRUNTIME_H
#define KRAWRUNTIME_H

#ifdef __WIN32__
#include "kernel/nwin32loghandler.h"
#include "tools/nwinmaincmdlineargs.h"
#else
#include "tools/ncmdlineargs.h"
#endif
#include "kernel/nkernelserver.h"

//------------------------------------------------------------------------------

class nScriptServer;
class nGfxServer2;
class nInputServer;
class nConServer;
class nResourceServer;
class nVariableServer;
class nAnimationServer;
class nParticleServer;
class nPrefServer;
class nCaptureServer;

class Kraw3D;

class Runtime
{
public:
    
    Runtime();

    void Init();
    void Shutdown();

    bool Trigger();
    void Render();

    void SetArgs( nCmdLineArgs& args ) { this->args = args; }
    float GetTimeFrame() { return frameTime; }

private:

    nRef<Kraw3D> refGfxServer;
    //nRef<nGfxServer2> refGfxServer;
    nRef<nInputServer> refInputServer;
    nRef<nScriptServer> refScriptServer;

    nRef<nConServer> refConServer;
    nRef<nResourceServer> refResourceServer;
    nRef<nVariableServer> refVarServer;
    nRef<nAnimationServer> refAnimServer;
    nRef<nParticleServer> refParticleServer;
    nRef<nPrefServer> refPrefServer;
    nRef<nCaptureServer> refCaptureServer;

    nCmdLineArgs args;
    float frameTime;
    nTime prevTime;
    uint frameId;
};


#endif
